#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
using namespace std;

/*
 *对于顺序关联容器来说，必须提供相应的<运算符
 * class a{
	private:
		double val;
	public:
		a(double nd):val(nd){}
		double get_val() const{return val;}
		const对象只能调用const类型的成员
};
bool operator<(const a& na,const a& nb){
	return na.get_val() < nb.get_val();
}
*/
/*pair操作*/

/*
class test{
	friend bool operator<(const test& a,const test& b);
	private:
		int val;
	public:
		test(){}
		test(int nt):val(nt){}
		
};

bool operator<(const test& a,const test& b){
	return a.val<b.val;
}
*/
/*
void ppp(int t[]){
}
*/
int main(){
	/*
	test b(2);
	test c(4);
	map<int,test>nmap={{2,b},{4,c}};
	nmap[2]=b;
	nmap[4]=c;
	*/


	/*pair是map的底层类型
	pair<string,int>a={"123",123};
	cout<<a.first<<" and "<<a.second<<endl;
	*/
	/*
	map<a,int>b;
	a c(1.23);
	a d(3.45);
	c < d;
	b[c]=1;
	b[d]=2;
	*
	*/


	/*set insert
	vector<int> toinsert={2,4,6,8,2,4,6,8};
	set<int> nset;
	nset.insert(toinsert.cbegin(),toinsert.cend());
	for(auto i=nset.begin();i!=nset.end();++i){
		cout<<*i<<endl;
	}*/

	//vector<int> toinsert={2,4,6,8,2,4,6,8};
	/*set<int> nset;
	nset.insert({1,2,3,4});
	for(auto i=nset.begin();i!=nset.end();++i){
		cout<<*i<<endl;
	}*/

	/*int a[2]={0,1};
	ppp(a);*/


}
